import { domainService } from '~/config/server'
import { NetService } from '~/utils/net.service'
import { Inject, Debounce } from "~/core/decorator";
import { FilterService } from '~/utils/filter.service';
export class ReportManageService {

  @Inject(NetService)
  private netService: NetService

  /**
   * 回款统计查询
   */
  public getAllRepaymentReportData(data) {
    return this.netService.send({
      server: domainService.reportController.getAllRepaymentReportData,
      data
    })
  }
  /**
   * 每日催收统计
   */
  public queryCollectDataDays(data) {
    const params = { ...data }
    params.queryDateMin = FilterService.dateRanageFormat(data.queryDate).start
    params.queryDateMax = FilterService.dateRanageFormat(data.queryDate).end
    delete params.queryDate
    return this.netService.send({
      server: domainService.reportController.queryCollectDataDays,
      data: params
    })
  }

  /**
   * 流水报表导出
   */
  public exportReport(data) {
    return this.netService.send({
      server: domainService.reportController.exportReport,
      data
    })
  }

}